// import Vue from 'vue';
// import Router from 'vue-router';
// import RegisterComponent from './components/RegisterComponent.vue';
// import LoginComponent from './components/LoginComponent.vue';
// // 假设还有其他组件，比如首页组件 HomeComponent等，也一并导入
// import HomeComponent from './components/HomeComponent.vue';

// Vue.use(Router);

// export default new Router({
//   routes: [
//     {
//       path: '/register',
//       name: 'register',
//       component: RegisterComponent
//     },
//     {
//       path: '/login',
//       name: 'login',
//       component: LoginComponent
//     },
//     {
//       path: '/home',
//       name: 'home',
//       component: HomeComponent
//     },
//     // 配置更多的路由路径和对应的组件，以实现整个系统页面间的导航
//   ]
// });

import { createRouter, createWebHistory } from 'vue-router';
import Login from './components/Login.vue';
import Register from './components/Register.vue';
import TripSearch from './components/TripSearch.vue';
import BookTrip from './components/BookTrip.vue';
import OrderManagement from './components/OrderManagement.vue';
import Home from './components/Home.vue'; // 假设还有首页组件

const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: '/login',
      name: 'login',
      component: Login
    },
    {
      path: '/register',
      name: 'register',
      component: Register
    },
    {
      path: '/trip-search',
      name: 'trip-search',
      component: TripSearch
    },
    {
      path: '/book-trip',
      name: 'book-trip',
      component: BookTrip
    },
    {
      path: '/order-management',
      name: 'order-management',
      component: OrderManagement
    },
    {
      path: '/home',
      name: 'home',
      component: Home
    },
    // 可以根据实际情况添加更多路由路径和对应的组件，比如订单详情页等
  ]
});

export default router;